Skip to content

Move Member Notes to its own member edit panel - #3665

Draft
dparker1005 wants to merge 1 commit into
strangerstudios:v3.8from
dparker1005:add-member-notes-panel
Draft

Move Member Notes to its own member edit panel#3665
dparker1005 wants to merge 1 commit into
strangerstudios:v3.8from
dparker1005:add-member-notes-panel

Conversation

@dparker1005

Copy link
Copy Markdown
Member

Summary

  • Replaces the single Member Notes textarea on the User Info panel with a dedicated Member Notes panel that operates like Order Notes — each entry is timestamped with the author's display name, and entries can be trashed individually. No edit-all affordance.
  • Notes are still stored as a string in the user_notes user meta (same key as before), using the same <date> by <author>: <body> shape order notes use, with notes separated by a blank line. Existing free-form user_notes content is parsed as one or more "Legacy note" entries that can be trashed like any other.
  • Self-contained in a new PMPro_Member_Edit_Panel_Member_Notes class — no new public helper functions or DB migrations.

Test plan

  • On a user with no prior member notes: panel shows "No notes for this member." Add a note → it appears with the current time and your display name. Add a second → both visible, newest at top. Trash one → only the other remains.
  • On a user with existing user_notes content (free-form text from the old textarea): panel shows it as a "Legacy note" entry. Trashing it removes it from user_notes. Adding a new note alongside legacy content works.
  • User Info panel no longer shows the Member Notes textarea; saving the User Info panel does not clobber user_notes.
  • get_user_meta( $user_id, 'user_notes', true ) still returns a string after add/delete (verify via WP-CLI or a quick var_dump), so any add-on / export reading that key is unaffected.
  • Multi-line note bodies render correctly (line breaks preserved). Notes containing blank lines get their blank lines collapsed on add (intentional, so the \n\n separator stays unambiguous).
  • User without pmpro_get_edit_member_capability() cannot add or delete notes.

🤖 Generated with Claude Code

Replaces the single Member Notes textarea on the User Info panel with a
dedicated Member Notes panel that operates like Order Notes: each entry
is timestamped with the author's display name, and entries can be
trashed individually. There is no edit-all affordance.

Notes are still stored as a string in the `user_notes` user meta — same
key as before — using the same `<date> by <author>: <body>` shape order
notes use, with notes separated by a blank line. Existing free-form
content in `user_notes` is parsed as one or more "Legacy note" entries
that can be trashed like any other note.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dparker1005 dparker1005 added this to the 3.8 milestone May 1, 2026
@dparker1005
dparker1005 requested a review from kimcoleman May 1, 2026 14:19
@dparker1005
dparker1005 changed the base branch from dev to v3.8 June 4, 2026 17:55
@dparker1005
dparker1005 marked this pull request as draft June 5, 2026 13:03
@dparker1005

Copy link
Copy Markdown
Member Author

Holding off on this PR for now.

We should consider if having a combined "notes" table for member notes, order notes, and maybe subscription notes is a better design long-term. Also worth taking a look at a plugin like WP Activity Log to see if we want to integrate with an existing solution.

@dparker1005 dparker1005 removed this from the 3.8 milestone Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant